package artid.com.arttogo.bean;

import org.json.JSONObject;

import java.io.Serializable;

/**
 * 
*    
* 项目名称：ArtworkArt   
* 类名称：AuctionInformationParser   
* 类描述：拍卖会-专场详情-专场信息实体类+解析   
* 创建人：耿卫斌   
* 创建时间：2017-3-13 下午1:19:06   
*
 */
public class AuctionInformationParser extends AppItem implements Serializable {
	private static final long serialVersionUID = 1L;
	private AuctionInformation_AuctionInfo auctioninfo=new AuctionInformation_AuctionInfo();//拍卖会详细信息
	private AuctionInformation_JigouInfo jigouinfo=new AuctionInformation_JigouInfo();//所属机构详细信息
	@Override
	public void parse(JSONObject obj) {
		// TODO Auto-generated method stub
		if (null == obj) {
			return;
		}
		JSONObject auctioninfo_obj=obj.optJSONObject("auctioninfo");
		auctioninfo.setAuction_address(auctioninfo_obj.optString("auction_address"));
		auctioninfo.setAuction_end_time(auctioninfo_obj.optString("auction_end_time"));
		auctioninfo.setAuction_latitude(auctioninfo_obj.optString("auction_latitude"));
		auctioninfo.setAuction_longitude(auctioninfo_obj.optString("auction_longitude"));
		auctioninfo.setAuction_start_time(auctioninfo_obj.optString("auction_start_time"));
		auctioninfo.setId(auctioninfo_obj.optString("id"));
		auctioninfo.setJigou_id(auctioninfo_obj.optString("jigou_id"));
		auctioninfo.setPreview_address(auctioninfo_obj.optString("preview_address"));
		auctioninfo.setPreview_end_time(auctioninfo_obj.optString("preview_end_time"));
		auctioninfo.setPreview_latitude(auctioninfo_obj.optString("preview_latitude"));
		auctioninfo.setPreview_longitude(auctioninfo_obj.optString("preview_longitude"));
		auctioninfo.setPreview_start_time(auctioninfo_obj.optString("preview_start_time"));
		auctioninfo.setTitle(auctioninfo_obj.optString("title"));
		auctioninfo.setTurnover(auctioninfo_obj.optString("turnover"));
		auctioninfo.setTurnoverrate(auctioninfo_obj.optString("turnoverrate"));
		auctioninfo.setUnit(auctioninfo_obj.optString("unit"));
		JSONObject jigouinfo_obj=obj.optJSONObject("jigouinfo");
		jigouinfo.setAddress(jigouinfo_obj.optString("address"));
		jigouinfo.setAuction_num(jigouinfo_obj.optString("auction_num"));
		jigouinfo.setId(jigouinfo_obj.optString("id"));
		jigouinfo.setImgurl(jigouinfo_obj.optString("imgurl"));
		jigouinfo.setLot_num(jigouinfo_obj.optString("lot_num"));
		jigouinfo.setLotrecord_num(jigouinfo_obj.optString("lotrecord_num"));
		jigouinfo.setSeller_name(jigouinfo_obj.optString("seller_name"));
		jigouinfo.setSpecial_num(jigouinfo_obj.optString("special_num"));
	}
	public AuctionInformation_AuctionInfo getAuctioninfo() {
		return auctioninfo;
	}
	public void setAuctioninfo(AuctionInformation_AuctionInfo auctioninfo) {
		this.auctioninfo = auctioninfo;
	}
	public AuctionInformation_JigouInfo getJigouinfo() {
		return jigouinfo;
	}
	public void setJigouinfo(AuctionInformation_JigouInfo jigouinfo) {
		this.jigouinfo = jigouinfo;
	}
	public AuctionInformationParser() {
		super();
	}
	public AuctionInformationParser(AuctionInformation_AuctionInfo auctioninfo,
									AuctionInformation_JigouInfo jigouinfo) {
		super();
		this.auctioninfo = auctioninfo;
		this.jigouinfo = jigouinfo;
	}
	
	@Override
	public String toString() {
		return "AuctionInformationParser [auctioninfo=" + auctioninfo
				+ ", jigouinfo=" + jigouinfo + "]";
	}

	public class AuctionInformation_AuctionInfo implements Serializable {
		private static final long serialVersionUID = 1L;
		private String id;//拍卖会id
		private String jigou_id;//机构ID
		private String title;//拍卖会名称
		private String preview_start_time;//预展开始时间
		private String preview_end_time;//预展结束时间
		private String preview_address;//预展地址
		private String preview_latitude;//预展地址维度
		private String preview_longitude;//预展地址经度
		private String auction_start_time;//拍卖开始时间
		private String auction_end_time;//拍卖结束时间
		private String auction_address;//拍卖地址
		private String auction_latitude;//拍卖地址纬度
		private String auction_longitude;//拍卖地址经度
		private String turnover;//成交额
		private String unit;//成交额单位
		private String turnoverrate;//成交率
		public String getId() {
			return id;
		}
		public void setId(String id) {
			this.id = id;
		}
		public String getJigou_id() {
			return jigou_id;
		}
		public void setJigou_id(String jigou_id) {
			this.jigou_id = jigou_id;
		}
		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}
		public String getPreview_start_time() {
			return preview_start_time;
		}
		public void setPreview_start_time(String preview_start_time) {
			this.preview_start_time = preview_start_time;
		}
		public String getPreview_end_time() {
			return preview_end_time;
		}
		public void setPreview_end_time(String preview_end_time) {
			this.preview_end_time = preview_end_time;
		}
		public String getPreview_address() {
			return preview_address;
		}
		public void setPreview_address(String preview_address) {
			this.preview_address = preview_address;
		}
		public String getPreview_latitude() {
			return preview_latitude;
		}
		public void setPreview_latitude(String preview_latitude) {
			this.preview_latitude = preview_latitude;
		}
		public String getPreview_longitude() {
			return preview_longitude;
		}
		public void setPreview_longitude(String preview_longitude) {
			this.preview_longitude = preview_longitude;
		}
		public String getAuction_start_time() {
			return auction_start_time;
		}
		public void setAuction_start_time(String auction_start_time) {
			this.auction_start_time = auction_start_time;
		}
		public String getAuction_end_time() {
			return auction_end_time;
		}
		public void setAuction_end_time(String auction_end_time) {
			this.auction_end_time = auction_end_time;
		}
		public String getAuction_address() {
			return auction_address;
		}
		public void setAuction_address(String auction_address) {
			this.auction_address = auction_address;
		}
		public String getAuction_latitude() {
			return auction_latitude;
		}
		public void setAuction_latitude(String auction_latitude) {
			this.auction_latitude = auction_latitude;
		}
		public String getAuction_longitude() {
			return auction_longitude;
		}
		public void setAuction_longitude(String auction_longitude) {
			this.auction_longitude = auction_longitude;
		}
		public String getTurnover() {
			return turnover;
		}
		public void setTurnover(String turnover) {
			this.turnover = turnover;
		}
		public String getUnit() {
			return unit;
		}
		public void setUnit(String unit) {
			this.unit = unit;
		}
		public String getTurnoverrate() {
			return turnoverrate;
		}
		public void setTurnoverrate(String turnoverrate) {
			this.turnoverrate = turnoverrate;
		}
		public AuctionInformation_AuctionInfo() {
			super();
		}
		public AuctionInformation_AuctionInfo(String id, String jigou_id,
											  String title, String preview_start_time,
											  String preview_end_time, String preview_address,
											  String preview_latitude, String preview_longitude,
											  String auction_start_time, String auction_end_time,
											  String auction_address, String auction_latitude,
											  String auction_longitude, String turnover, String unit,
											  String turnoverrate) {
			super();
			this.id = id;
			this.jigou_id = jigou_id;
			this.title = title;
			this.preview_start_time = preview_start_time;
			this.preview_end_time = preview_end_time;
			this.preview_address = preview_address;
			this.preview_latitude = preview_latitude;
			this.preview_longitude = preview_longitude;
			this.auction_start_time = auction_start_time;
			this.auction_end_time = auction_end_time;
			this.auction_address = auction_address;
			this.auction_latitude = auction_latitude;
			this.auction_longitude = auction_longitude;
			this.turnover = turnover;
			this.unit = unit;
			this.turnoverrate = turnoverrate;
		}
		@Override
		public String toString() {
			return "AuctionInformation_AuctionInfo [id=" + id + ", jigou_id="
					+ jigou_id + ", title=" + title + ", preview_start_time="
					+ preview_start_time + ", preview_end_time="
					+ preview_end_time + ", preview_address=" + preview_address
					+ ", preview_latitude=" + preview_latitude
					+ ", preview_longitude=" + preview_longitude
					+ ", auction_start_time=" + auction_start_time
					+ ", auction_end_time=" + auction_end_time
					+ ", auction_address=" + auction_address
					+ ", auction_latitude=" + auction_latitude
					+ ", auction_longitude=" + auction_longitude
					+ ", turnover=" + turnover + ", unit=" + unit
					+ ", turnoverrate=" + turnoverrate + "]";
		}
	}
	
	public class AuctionInformation_JigouInfo implements Serializable {
		private static final long serialVersionUID = 1L;
		private String id;//机构id
		private String imgurl;//机构主题图
		private String seller_name;//机构名称
		private String auction_num;//拍卖会数量
		private String special_num;//专场数量
		private String lotrecord_num;//拍品备案数量
		private String lot_num;//拍品数量
		private String address;//所在城市
		public String getId() {
			return id;
		}
		public void setId(String id) {
			this.id = id;
		}
		public String getImgurl() {
			return imgurl;
		}
		public void setImgurl(String imgurl) {
			this.imgurl = imgurl;
		}
		public String getSeller_name() {
			return seller_name;
		}
		public void setSeller_name(String seller_name) {
			this.seller_name = seller_name;
		}
		public String getAuction_num() {
			return auction_num;
		}
		public void setAuction_num(String auction_num) {
			this.auction_num = auction_num;
		}
		public String getSpecial_num() {
			return special_num;
		}
		public void setSpecial_num(String special_num) {
			this.special_num = special_num;
		}
		public String getLotrecord_num() {
			return lotrecord_num;
		}
		public void setLotrecord_num(String lotrecord_num) {
			this.lotrecord_num = lotrecord_num;
		}
		public String getLot_num() {
			return lot_num;
		}
		public void setLot_num(String lot_num) {
			this.lot_num = lot_num;
		}
		public String getAddress() {
			return address;
		}
		public void setAddress(String address) {
			this.address = address;
		}
		public AuctionInformation_JigouInfo() {
			super();
		}
		public AuctionInformation_JigouInfo(String id, String imgurl,
											String seller_name, String auction_num, String special_num,
											String lotrecord_num, String lot_num, String address) {
			super();
			this.id = id;
			this.imgurl = imgurl;
			this.seller_name = seller_name;
			this.auction_num = auction_num;
			this.special_num = special_num;
			this.lotrecord_num = lotrecord_num;
			this.lot_num = lot_num;
			this.address = address;
		}
		@Override
		public String toString() {
			return "AuctionInformation_JigouInfo [id=" + id + ", imgurl="
					+ imgurl + ", seller_name=" + seller_name
					+ ", auction_num=" + auction_num + ", special_num="
					+ special_num + ", lotrecord_num=" + lotrecord_num
					+ ", lot_num=" + lot_num + ", address=" + address + "]";
		}
	}
}
